package xyz.jangle.design.visitor;

import java.util.ArrayList;

public class AppMain24 {

	public static void main(String[] args) {
		ArrayList<Element> list = new ArrayList<Element>();
		list.add(new ConcreteElementA());
		list.add(new ConcreteElementA());
		list.add(new ConcreteElementA());
		list.add(new ConcreteElementB());
		list.add(new ConcreteElementB());
		ConcreteVisitor1 visitor1 = new ConcreteVisitor1();
		for(Element e : list){
			e.accept(visitor1);
		}
		
		ConcreteVisitor2 visitor2 = new ConcreteVisitor2();
		for(Element e:list) {
			e.accept(visitor2);
		}

	}

}
